<style>
    .form-group .required:before{
        content:'* ';
        color:red;
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">




    <div class="form-group">
        <label for="c-name2" class="control-label col-xs-12 col-sm-2 required">名字:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name2" data-rule="required" class="form-control" name="row[name]" type="text" value="{$data.name ?? ''}" placeholder="">

        </div>
    </div>





    <div class="form-group">
        <label for="c-name3" class="control-label col-xs-12 col-sm-2 required">实例编号:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name3" data-rule="required" class="form-control" name="row[instance_code]" type="text" value="{$data.instance_code ?? ''}" placeholder="">

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2 required">套餐类型:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="row[package_id]" id="" class="form-control">
                <option value="0">请选择类型</option>
                {volist name='packageData' id='onePack'}
                <option value="{$onePack.id}" {if (empty($data) neq true) and ($data['package_id'] eq $onePack['id'])} selected{/if}>{$onePack.name}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2 required">状态:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>'上架', '-1'=>'下架'], $status)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2 required">就绪:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[init_status]', ['1'=>'就绪', '2'=>'还原中','-1'=>'执行失败'], $status)}
        </div>
    </div>






    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" name="row[id]" value="{$id}">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
